/**
 * 作者: heweiping
 * 日期: 2025-04-27 19:19:40
 * 备注: 每日特惠充值抽奖
 */
package com.motu.monstercity.server.game.commondata.act;

import io.vertx.core.json.JsonObject;

public class RaffleDrawModel {
    protected int id; // id
    protected int groupId; // 期数
    protected int sortId; // 奖励所在的位置 (数值为1的不读取权重字段，默认为其它14个奖励全部获得后，第15次抽取获得该奖励)
    protected int rate; // 权重
    protected String reward; // 奖励物品

    public RaffleDrawModel() {
    }

    public RaffleDrawModel(JsonObject obj) {
        id = obj.containsKey("id") ? obj.getInteger("id") : 0;
        groupId = obj.containsKey("group_id") ? obj.getInteger("group_id") : 0;
        sortId = obj.containsKey("sort_id") ? obj.getInteger("sort_id") : 0;
        rate = obj.containsKey("rate") ? obj.getInteger("rate") : 0;
        reward = obj.containsKey("reward") ? obj.getString("reward") : "";
    }

    public int getId() {
        return id;
    }

    public int getGroupId() {
        return groupId;
    }

    public int getSortId() {
        return sortId;
    }

    public int getRate() {
        return rate;
    }

    public String getReward() {
        return reward;
    }

}
